@extends('layout.admin')

@section('content')

<div class="container">
	<div class="row">
		<div class="span2">
			<div class="well sidebar-nav">
				<ul class="nav nav-list">
					<li class="nav-header">菜单</li>
					<li><a href="{{URL::to('admin/post')}}"><i class="icon-th-list"></i>
							日志列表</a></li>
					<li><a href="{{URL::to('admin/post/create')}}"><i
							class="icon-pencil"></i> 添加日志</a></li>
					<li><a href="{{URL::to('admin/posttype')}}"><i class="icon-th-list"></i>
							日志类型</a></li>
					<li class="active"><a href="{{URL::to('admin/posttype/create')}}"><i
							class="icon-pencil"></i> 添加类型</a></li>
				</ul>
			</div>
		</div>

		<div class="span10">
			<ul class="breadcrumb">
				<li><a href="{{ URL::to('admin') }}">首页</a> <span class="divider">/</span></li>
				<li><a href="{{ URL::to('admin/posttype') }}">日志类型</a> <span class="divider">/</span></li>
				<li class="active">编辑类型</li>
			</ul>
			
			{{ HTML::ul($errors->all()) }}

			{{Form::open(['url'=>'admin/posttype/' . $posttype->id , 'method'=>'PUT', 'class'=>'form-horizontal'])}}
			
			{{Form::token()}}
			<div class="control-group">
				{{Form::label('inputTitle', '类型标题', ['class'=>'control-label'])}}
				<div class="controls">
					{{Form::text('pname',$posttype->pname, ['id'=>'inputTitle', 'class'=>'span4'])}}
					<p class="text-warning">*必填</p>
				</div>
			</div>
			<div class="control-group">
				{{Form::label('inputKeywords', '关键字', ['class'=>'control-label'])}}
				<div class="controls">
					{{Form::text('keywords',$posttype->keywords, ['id'=>'inputKeywords', 'class'=>'span4'])}}
					<p class="text-warning">*必填</p>
				</div>
			</div>
			<div class="control-group">
				{{Form::label('inputDescription', '描述', ['class'=>'control-label'])}}
				<div class="controls">
					{{Form::textarea('description',$posttype->description, ['id'=>'inputDescription', 'class'=>'span4'])}}
					<p class="text-warning">*必填</p>
				</div>
			</div>
			
			<div class="control-group">
				<div class="controls">
				{{Form::hidden('id',$posttype->id)}}
				{{Form::submit('保存添加', ['class'=>'btn btn-success'])}}</div>
			</div>
			{{Form::close()}}

		</div>
	</div>
</div>
@stop


